package com.itheima.IoTest_1;

import java.io.*;

public class text_4 {
    public static void main(String[] args) throws IOException {
        //字节缓冲输入流
        //底层创建了8192的字节数组
        BufferedInputStream bis=new BufferedInputStream(new FileInputStream("IO\\a.txt"));
        //字节缓冲输出流
        //底层创建了8192的字节数组
        BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("IO\\b.txt"));
        int b;
        while ((b=bis.read())!=-1) {
            bos.write(bis.read());

        }
        //方法的底层会把字节流关闭
        bis.close();
        bos.close();
    }
}
